home *** CD-ROM | disk | FTP | other *** search
/ Aminet 19 / Aminet 19 (1997)(GTI - Schatztruhe)[!][Jun 1997].iso / Aminet / comm / cnet / cnet_who.lha / who / Upgrade271 < prev    next >
Text File  |  1997-04-26  |  2KB  |  52 lines

  1. /**************************************************************************\
  2.           $VER: CNet WHO Upgrade v2.71 (26-Apr-97) by Dotoran!
  3. \**************************************************************************/
  4. options results;signal on SYNTAX;signal on ERROR;signal on IOERR
  5. a=sourceline(2);parse var a . . . . . ", "ver" ("vdate")" .
  6. tr=transmit;se=sendstring;gc=getchar;gu=getuser;gs=getscratch;mg=maygetchar
  7. a="rexxsupport.library";if ~show("l",a) then if ~addlib(a,0,-30) then exit
  8. parse source . . fp .;dp=left(fp,max(lastpos('/',fp),lastpos(':',fp)))
  9.  
  10. se "n1Converting CNet Amiga Who config file to "ver"...n2"
  11.  
  12. se "You must FIRST be using CNet Amiga Who, v2.65 BEFORE using this update "
  13. se "script. If using v2.66 or higher, you do NOT need to run this update. "
  14. se "Is it alright to continue? [No]: ";gc;a=result
  15. if a~="Y" then do;tr "No.";exit;end;else tr "Yes!"
  16.  
  17. cfg=dp"Config.data"
  18.  
  19. if ~exists(cfg) then do
  20.   se "n2I could not locate the `Config.data' file. This upgrade script "
  21.   se "should be located inside the `Who/' directory before being used "
  22.   tr "for the first time.n1" ; exit ; end
  23.  
  24. call open(f1,dp"MakeWho","r");do 2;a=readln(f1);end;call close(f1)
  25. if word(a,3)~="v2.65" then do
  26.   se "n2According to your `MakeWho' file, you are NOT running version 2.65 "
  27.   se "of CNet Amiga Who, but in fact are using "word(a,3)". Please install "
  28.   se "v2.65 fully before continuing...n1" ; exit ; end
  29.  
  30. se "Converting CTRL-A's in the `Config.data' file to CTRL-S's..."
  31.  
  32.     call open(f1,cfg,"r")
  33.     call open(f2,cfg"2","w")
  34.       do i=1 until eof(f1)
  35.         a=readln(f1)
  36.         call writeln(f2,translate(a,"",d2c(1)))
  37.       end i
  38.     call close(f2)
  39.     call close(f1)
  40.     address command "delete "cfg ; address command "rename "cfg"2 "cfg
  41.  
  42. tr "Completed!n1"
  43.  
  44. exit
  45. SYNTAX:;ERROR:;IOERR:;e1="n1 Error: "rc" ("errortext(rc)")"
  46.   e2="  Line: "left(sigl,4)"File:";c="`"fp", "ver"'";e2=e2" "c;tr e1;tr e2
  47.   logentry e1;logentry e2;e=strip(translate(sourceline(sigl),"\{",""))
  48.   do while e~="";e3="Source: "left(e,37);tr e3;logentry e3;e=substr(e,38);end
  49.   bufferflush
  50. /**************************************************************************\
  51. \****************************************** Frontiers BBS (716)/823-9892 **/
  52.